<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/WEB-INF/tern/tern-tags.tld" prefix="tern" %>
<tern:page pageForm="admin.CurriculaPage">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
     <title>学生选课信息</title>
    <meta http-equiv="pragma" content="no-cache" />
     <meta http-equiv="cache-control" content="no-cache" />
     <meta http-equiv="expires" content="0" />  
     <link href="${applicationScope.root}js/toolbar/toolbar.css"
	 rel="stylesheet" type="text/css" /> 
     <link rel="stylesheet" type="text/css" href="${applicationScope.root}skins/default/main.css">
     <link type="text/css" href="${applicationScope.root}js/themes/ui-lightness/jquery.ui.all.css" rel="stylesheet" />
     <script type="text/javascript" src="${applicationScope.root}js/jquery.min.js"></script>  
     <script type="text/javascript" src="${applicationScope.root}js/ui/jquery-ui.min.js"></script>   
     <script type="text/javascript" src="${applicationScope.root}js/toolbar/toolbar.js"></script>      
     <script type="text/javascript" src="${applicationScope.root}js/util.js"></script>
     <script language="javascript">
     $(function() {
    		$("#toolbar1").commonBar(
    				{
    					rootPath : '${applicationScope.root}js/toolbar/',
    					commandClick : function(cmd) {
    						var id = firstChecked('curriculaID');		
    						if (cmd == "new") {
    							openDialog('curriculaEdit.jsp?time=' +(new Date()).getTime(),"curriculaEdit",300,350,450,150);
    						} else if (cmd == 'modify') {
    							if (id == null) {
    								alert('您没有选中任何数据!');
    								return;
    							} else {
    								openDialog('curriculaEdit.jsp?id='+id+'&time=' +(new Date()).getTime(),"curriculaEdit",300,350,450,150);
    							}
    						} else if (cmd == 'import') {		
    							openDialog('importCurriculaExcel.jsp?time='+ (new Date()).getTime(),"importStudentExcel",400,400,440,100);

    						}else if (cmd == "export") {
    							var rootDir = "${page.webSite}${applicationScope.root}";
    							var url=rootDir+'curExcel.jsp';
    							openExcel(url); 
    							
    						}else if (cmd == "del") {
    							if (id == null) {
    								alert('您没有选中任数据!');
    								return;
    							} else {
    								askYesOrNo({
    									message : '您确实要删除选中的数据吗？',
    									onok : function() {
    										$('#myForm').onevent('onDel', id);
    									}
    								});
    							}
    						}
    					}
    				});
    	});
     </script>
     <style type="text/css">
        body {margin:0px 8px 8px;}
     </style>
</head>
<body>
  <tern:form method="post" id="myForm">
        <ul id="toolbar1">
  		<li>-</li><li>-</li>
		<li><img
			src="${applicationScope.root}skins/common/icon_new.png" /> <a
			href='#new'>新建</a>
		</li>
		 
		<li><img
			src="${applicationScope.root}skins/common/bt_edit.png" /> <a
			href='#modify'>修改</a>
		</li>
		 
		<li><img
			src="${applicationScope.root}skins/common/bt_del.png" /> <a
			href='#del'>删除</a>
		</li>
		<li style="width: 105px"><img
			src="${applicationScope.root}skins/common/bt_model.png" /> <a
			href='#export'>EXCEL模板</a>
		</li>
		<li style="width: 100px"><img
			src="${applicationScope.root}skins/common/bt_x.png" />
		<a href='#import'>批量导入</a>
		</li>
	</ul>
	<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr>  
        <td>         
           <div class="title"><span>当前位置：</span>选课管理 &gt; 选课信息</div> 
           </td>         
        </tr>         
      </table>	
        <tern:table id="enTable" dataSource="${page.curricula}">
            <tern:theader>
                <tern:tcell width="75" height="24" align="center">选择</tern:tcell>
                 <tern:tcell align="center">学生</tern:tcell>
                <tern:tcell align="center">课程班</tern:tcell>     
                <tern:tcell align="center">分数 </tern:tcell>
	        </tern:theader>
	        <tern:trow>	
                <tern:tcell height="22" align="center">
                   <input value='${item.curriculaID}' name="curriculaID" type="radio" />                    
                </tern:tcell>
                <tern:tcell>&nbsp;${item.stuID}</tern:tcell>
                <tern:tcell>&nbsp;${item.classID}</tern:tcell> 
                <tern:tcell>&nbsp;${item.totalScore}</tern:tcell>                 
	       </tern:trow>	       
        </tern:table>
        <input name="b_refreah" type="button" value="刷新" style="display:none" onClick="on_event('onRefresh','')"/>
  </tern:form>
</body>
</html>
</tern:page>
